<admintpl file="header" />
<head>
    <meta charset="UTF-8">
    <title>类型列表</title>
</head>
<body>

    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a>类型列表</a></li>
            <li><a href="{:U('Label/AdminIndex/label_type_edit')}">新建分类</a></li>
        </ul>

        <form class="well form-search" method="post" action="{:U('AdminIndex/label_type')}">&nbsp;
            类型名称：
            <input type="text" name="name" style="width: 150px;" value="{$name|default=''}" placeholder="请输入类型名称">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:U('AdminIndex/label_type')}">清空</a>
        </form>

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50">ID</th>
                <th width="150">类型名称</th>
                <th width="70">状态</th>
                <th width="70">操作</th>
            </tr>
            </thead>
            <php>$status = array('0' => "隐藏", '1' => "显示")</php>
            <foreach name="label_types" item="vo">
                <tr>
                    <td><b>{$vo.id}</b></td>
                    <td>{$vo.name}</td>
                    <td>{$status[$vo['status']]}</td>
                    <td>
                        <a href="{:U('AdminIndex/label_type_edit', ['id' => $vo['id']])}">{:L('EDIT')}</a> |
                        <a href="{:U('AdminIndex/label_type_edit', array('id' => $vo['id'], 'delete' => 1))}">{:L('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
        </table>

    </div>

</body>
</html>